package com.cal.calonecal.controller;

import com.cal.calonecal.common.Response;
import com.cal.calonecal.pojo.vo.EquationVO;
import com.cal.calonecal.pojo.vo.JudgeResultVO;
import com.cal.calonecal.pojo.vo.ProblemLog;
import com.cal.calonecal.pojo.vo.WrongEquationVO;
import com.cal.calonecal.service.ICompleteEquationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 76004
 * @apiNote
 * @date 2023/5/29 0:08
 */
@RestController
@RequestMapping("/wrong")
@CrossOrigin
public class WrongEquationController {
    @Autowired
    private ICompleteEquationService wrongEquationService;

    @GetMapping("/select-page")
    public Response<List<WrongEquationVO>>selectPage(Integer pageNum, Integer pageSize){
        return wrongEquationService.selectPage(pageNum, pageSize);
    }

    @GetMapping("/redo")
    public Response<List<EquationVO>>redo(Integer num){
        return wrongEquationService.redo(num);
    }

    @GetMapping("/get-problem-log")
    public Response<ProblemLog>getProblemLog(){
        return wrongEquationService.getProblemLog();
    }


}
